package top.chenyaohua.action;


import top.chenyaohua.annotion.*;
import top.chenyaohua.beans.User;
import top.chenyaohua.http.HttpResponse;
import top.chenyaohua.http.ResponseContextHandler;
import top.chenyaohua.serviceImp.UserServiceImp;

@Action
@Path(value = "user")
public class UserAction {


    @Inject
    private UserServiceImp userServiceImp;

    @GET
    @Path(value = "login")
    public @ResponseBody User login(@From String name, @From String password){
        HttpResponse httpResponse = ResponseContextHandler.getHttpResponse();

        return userServiceImp.login(name,password);
    }

}
